﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;
using VideoCache.Server.MVCWeb.Attributes;

namespace VideoCache.Server.MVCWeb.Areas.Member.Models
{
    public class UserModel
    {
        [Display(Name = "用户名")]
        [Required(ErrorMessage = "用户名不能为空。")]
        public string UserName { get; set; }

        [Display(Name = "昵称")]
        [Required(ErrorMessage = "昵称不能为空。")]
        public string NickName { get; set; }

        [Display(Name = "电子邮件")]
        [Required(ErrorMessage = "电子邮件不能为空。")]
        [Email(ErrorMessage = "请填写正确的电子邮件地址。")]
        public string Email { get; set; }

        [Display(Name = "姓名")]
        [Required(ErrorMessage = "姓名不能为空。")]
        public string RealName { get; set; }

        [Display(Name = "性别")]
        [Required(ErrorMessage = "请选择性别。")]
        public UserSex Sex { get; set; }

        [Display(Name = "出生日期")]
        [DataType(DataType.Date)]
        public DateTime Birthday { get; set; }

        [Display(Name = "联系电话")]
        [Required(ErrorMessage = "联系电话不能为空。")]
        public string Telephone { get; set; }

        [Display(Name = "手机号码")]
        [Required(ErrorMessage = "手机号码不能为空。")]
        public string MobilePhone { get; set; }

        [Display(Name = "所在省份")]
        [Required(ErrorMessage = "请选择所在省份。")]
        public string Province { get; set; }

        [Display(Name = "所在城市")]
        [Required(ErrorMessage = "请选择所在城市。")]
        public string City { get; set; }
    }

    public enum UserSex : int
    {
        Male = 0,
        Female = 1
    }
}